<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <head>
        <link rel="stylesheet" type="text/css" href="/AnimeList/resources/css/templateStyle.css"/>
    </head>
    <ui:component>
        
                <p:panel rendered="#{rendered}">
                        <h:outputText value="Студия: " styleClass="labeledText"/>
                        <h:outputText value="#{anime.studio.studioName}"/>
                        <br/>
                        <h:outputText value="Жанр:" styleClass="labeledText"/>
                        <ui:repeat value="#{genreList}" var="genres" rendered="#{genreList!=null}">
                            <h:commandLink value="#{genres}" action="template"/>
                            <h:outputText value=", "/>
                        </ui:repeat>
                        <br/>
                        <h:outputText value="Тип: "/>
                        <h:outputText value="#{anime.typeInfo}"/>
                        <br/>
                        <h:outputText value="Выпуск: "/>
                        <h:outputText value="#{anime.interval}"/>
                        <br/>
                        <br/>
                        <h:outputText value="Ваша оценка: " rendered="#{!readOnly}"/>
                        <br/>
                        <p:rating value="#{rateValue}" stars="10" binding="#{rateBind}" disabled="true" rendered="#{!readOnly}">
                            <f:param name="animeId" value="#{anime.id}"/>
                        </p:rating>
                        <br/>
                        <h:outputText value="Средний балл: "/>
                        <h:outputText value="#{anime.avgRate}"/>
                        <br/>
                        <h:outputText value="Место: "/>
                        <h:outputText value="#{anime.topRate}"/>
                        <br/>
                        <h:outputText value="Проголосовало: "/>
                        <h:outputText value="#{anime.voteCount}"/>
                        <br/>
                        <p:graphicImage value="/taglibs/vote_ico.png" onclick="#{onRateIconClick}" />
                        <p:graphicImage value="/taglibs/user_ico.png"/>
                        <p:graphicImage value="/taglibs/users_ico.png"/>
                </p:panel>
            
    </ui:component>
</html>

